home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 July / Macworld (1999-07).dmg / Shareware World / Info / For Developers / Mops 3.4.sea / Mops source / Toolbox classes / PrintManager < prev    next >
MacBinary  |  1994-05-08  |  7.6 KB  |  [TEXT/MSET]

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: MacBinary (archive/macBinary).

You can browse this item here: PrintManager

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Sun May 8 17:44:47 1994, modified Sun May 8 17:44:47 1994, creator 'MSET', type ASCII, 7244 bytes "PrintManager" , at 0x1ccc 375 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MSET]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0c 50 72 69 6e 74 4d | 61 6e 61 67 65 72 00 00 |..PrintM|anager..|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 53 45 | 54 01 00 00 00 00 00 00 |.TEXTMSE|T.......|
|00000050| 00 00 00 00 00 1c 4c 00 | 00 01 77 a9 f3 0d cf a9 |......L.|..w.....|
|00000060| f3 0d cf 00 00 08 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 ea 2c 00 00 |........|.....,..|
|00000080| 09 5c 20 32 34 4a 75 6c | 39 32 20 44 42 48 0d 0d |.\ 24Jul|92 DBH..|
|00000090| 5c 20 6e 6f 74 65 20 74 | 68 61 74 20 64 6c 65 6e |\ note t|hat dlen|
|000000a0| 20 66 72 6f 6d 20 74 68 | 65 20 73 6f 75 72 63 65 | from th|e source|
|000000b0| 20 66 69 6c 65 20 63 6c | 61 73 73 20 77 61 73 20 | file cl|ass was |
|000000c0| 72 65 64 65 66 69 6e 65 | 64 20 61 73 20 61 20 76 |redefine|d as a v|
|000000d0| 61 6c 75 65 20 69 6e 0d | 5c 20 74 68 65 20 73 6f |alue in.|\ the so|
|000000e0| 75 72 63 65 20 66 69 6c | 65 20 73 74 72 75 63 74 |urce fil|e struct|
|000000f0| 0d 3a 20 44 61 74 61 4c | 65 6e 67 74 68 09 28 20 |.: DataL|ength.( |
|00000100| 5e 63 6c 61 73 73 20 2d | 2d 20 6e 20 29 20 20 5c |^class -|- n ) \|
|00000110| 20 67 69 76 65 6e 20 61 | 20 70 6f 69 6e 74 65 72 | given a| pointer|
|00000120| 20 74 6f 20 61 20 63 6c | 61 73 73 2c 20 72 65 74 | to a cl|ass, ret|
|00000130| 75 72 6e 20 74 68 65 0d | 09 09 09 09 09 09 09 09 |urn the.|........|
|00000140| 20 5c 20 6c 65 6e 67 74 | 68 20 6f 66 20 74 68 65 | \ lengt|h of the|
|00000150| 20 69 76 61 72 20 64 61 | 74 61 0d 09 64 6c 65 6e | ivar da|ta..dlen|
|00000160| 26 78 77 69 64 20 64 72 | 6f 70 20 3b 0d 0d 0d 5c |&xwid dr|op ;...\|
|00000170| 20 64 65 66 69 6e 65 20 | 74 68 65 20 6e 6f 6e 2d | define |the non-|
|00000180| 74 72 69 76 69 61 6c 20 | 74 6f 6f 6c 62 6f 78 20 |trivial |toolbox |
|00000190| 63 61 6c 6c 73 20 61 73 | 20 6e 6f 72 6d 61 6c 20 |calls as| normal |
|000001a0| 77 6f 72 64 73 2c 20 6e | 6f 74 20 72 65 71 75 69 |words, n|ot requi|
|000001b0| 72 65 64 2c 20 62 75 74 | 0d 5c 20 74 68 69 73 20 |red, but|.\ this |
|000001c0| 6d 61 6b 65 73 20 69 74 | 20 65 61 73 69 65 72 20 |makes it| easier |
|000001d0| 74 6f 20 66 6f 6c 6c 6f | 77 20 74 68 65 20 6d 65 |to follo|w the me|
|000001e0| 74 68 6f 64 73 2c 20 49 | 20 74 68 69 6e 6b 0d 0d |thods, I| think..|
|000001f0| 3a 20 50 72 56 61 6c 69 | 64 61 74 65 20 20 7b 20 |: PrVali|date { |
|00000200| 74 68 50 72 69 6e 74 20 | 2d 2d 20 62 20 7d 0d 09 |thPrint |-- b }..|
|00000210| 77 6f 72 64 30 20 74 68 | 50 72 69 6e 74 20 63 61 |word0 th|Print ca|
|00000220| 6c 6c 20 50 72 56 61 6c | 69 64 61 74 65 20 69 2d |ll PrVal|idate i-|
|00000230| 3e 6c 20 3b 0d 09 0d 3a | 20 50 72 53 74 6c 44 69 |>l ;...:| PrStlDi|
|00000240| 61 6c 6f 67 20 20 7b 20 | 74 68 50 72 69 6e 74 20 |alog { |thPrint |
|00000250| 2d 2d 20 62 20 7d 0d 09 | 77 6f 72 64 30 20 74 68 |-- b }..|word0 th|
|00000260| 50 72 69 6e 74 20 63 61 | 6c 6c 20 50 72 53 74 6c |Print ca|ll PrStl|
|00000270| 44 69 61 6c 6f 67 20 69 | 2d 3e 6c 20 3b 0d 09 0d |Dialog i|->l ;...|
|00000280| 3a 20 50 72 4a 6f 62 44 | 69 61 6c 6f 67 20 20 7b |: PrJobD|ialog {|
|00000290| 20 74 68 50 72 69 6e 74 | 20 2d 2d 20 62 20 7d 0d | thPrint| -- b }.|
|000002a0| 09 77 6f 72 64 30 20 74 | 68 50 72 69 6e 74 20 63 |.word0 t|hPrint c|
|000002b0| 61 6c 6c 20 50 72 4a 6f | 62 44 69 61 6c 6f 67 20 |all PrJo|bDialog |
|000002c0| 69 2d 3e 6c 20 3b 0d 09 | 0d 3a 20 50 72 4f 70 65 |i->l ;..|.: PrOpe|
|000002d0| 6e 44 6f 63 20 7b 20 74 | 68 50 72 69 6e 74 20 74 |nDoc { t|hPrint t|
|000002e0| 70 50 72 50 6f 72 74 20 | 74 70 49 4f 42 75 66 20 |pPrPort |tpIOBuf |
|000002f0| 2d 2d 20 54 50 50 72 50 | 6f 72 74 20 7d 0d 09 30 |-- TPPrP|ort }..0|
|00000300| 20 74 68 50 72 69 6e 74 | 20 74 70 50 72 50 6f 72 | thPrint| tpPrPor|
|00000310| 74 20 74 70 49 4f 42 75 | 66 20 63 61 6c 6c 20 50 |t tpIOBu|f call P|
|00000320| 72 4f 70 65 6e 44 6f 63 | 20 3b 0d 09 0d 3a 20 50 |rOpenDoc| ;...: P|
|00000330| 72 45 72 72 6f 72 20 28 | 20 2d 2d 20 65 72 72 6f |rError (| -- erro|
|00000340| 72 43 6f 64 65 20 29 0d | 09 77 6f 72 64 30 20 63 |rCode ).|.word0 c|
|00000350| 61 6c 6c 20 50 72 45 72 | 72 6f 72 20 69 2d 3e 6c |all PrEr|ror i->l|
|00000360| 20 3b 0d 0d 5c 20 6e 6f | 77 20 64 65 66 69 6e 65 | ;..\ no|w define|
|00000370| 20 73 6f 6d 65 20 63 6c | 61 73 73 65 73 20 66 6f | some cl|asses fo|
|00000380| 72 20 74 68 65 20 70 75 | 72 70 6f 73 65 20 6f 66 |r the pu|rpose of|
|00000390| 20 6d 61 70 70 69 6e 67 | 20 69 6e 74 6f 20 74 68 | mapping| into th|
|000003a0| 65 20 4d 61 63 20 72 65 | 63 6f 72 64 73 0d 0d 3a |e Mac re|cords..:|
|000003b0| 63 6c 61 73 73 20 54 50 | 72 49 6e 66 6f 09 73 75 |class TP|rInfo.su|
|000003c0| 70 65 72 7b 20 6f 62 6a | 65 63 74 20 7d 0d 72 65 |per{ obj|ect }.re|
|000003d0| 63 6f 72 64 0d 7b 09 69 | 6e 74 09 09 69 44 65 76 |cord.{.i|nt..iDev|
|000003e0| 0d 09 69 6e 74 09 09 69 | 56 52 65 73 09 5c 20 76 |..int..i|VRes.\ v|
|000003f0| 65 72 74 69 63 61 6c 20 | 72 65 73 6f 6c 75 74 69 |ertical |resoluti|
|00000400| 6f 6e 20 6f 66 20 70 72 | 69 6e 74 65 72 0d 09 69 |on of pr|inter..i|
|00000410| 6e 74 09 09 69 48 52 65 | 73 09 5c 20 68 6f 72 69 |nt..iHRe|s.\ hori|
|00000420| 7a 6f 6e 74 61 6c 20 72 | 65 73 6f 6c 75 74 69 6f |zontal r|esolutio|
|00000430| 6e 20 6f 66 20 70 72 69 | 6e 74 65 72 0d 09 72 65 |n of pri|nter..re|
|00000440| 63 74 09 72 50 61 67 65 | 09 5c 20 70 61 67 65 20 |ct.rPage|.\ page |
|00000450| 72 65 63 74 61 6e 67 6c | 65 0d 7d 0d 3b 63 6c 61 |rectangl|e.}.;cla|
|00000460| 73 73 0d 0d 0d 3a 63 6c | 61 73 73 20 54 50 72 53 |ss...:cl|ass TPrS|
|00000470| 74 6c 09 73 75 70 65 72 | 7b 20 6f 62 6a 65 63 74 |tl.super|{ object|
|00000480| 20 7d 0d 72 65 63 6f 72 | 64 0d 7b 09 69 6e 74 09 | }.recor|d.{.int.|
|00000490| 09 77 44 65 76 09 5c 20 | 68 69 67 68 20 62 79 74 |.wDev.\ |high byt|
|000004a0| 65 20 73 70 65 63 69 66 | 69 65 73 20 64 65 76 69 |e specif|ies devi|
|000004b0| 63 65 20 28 31 3d 49 6d | 61 67 65 57 72 69 74 65 |ce (1=Im|ageWrite|
|000004c0| 72 2c 20 33 3d 4c 61 73 | 65 72 57 72 69 74 65 72 |r, 3=Las|erWriter|
|000004d0| 29 0d 09 36 20 62 79 74 | 65 73 20 6a 75 6e 6b 09 |)..6 byt|es junk.|
|000004e0| 5c 20 6d 6f 72 65 20 66 | 69 65 6c 64 73 20 66 6f |\ more f|ields fo|
|000004f0| 72 20 69 6e 74 65 72 6e | 61 6c 20 75 73 65 2c 20 |r intern|al use, |
|00000500| 6e 6f 74 20 6d 61 70 70 | 65 64 0d 7d 0d 3b 63 6c |not mapp|ed.}.;cl|
|00000510| 61 73 73 0d 0d 0d 3a 63 | 6c 61 73 73 20 54 50 72 |ass...:c|lass TPr|
|00000520| 4a 6f 62 20 20 73 75 70 | 65 72 7b 20 6f 62 6a 65 |Job sup|er{ obje|
|00000530| 63 74 20 7d 0d 72 65 63 | 6f 72 64 0d 7b 09 69 6e |ct }.rec|ord.{.in|
|00000540| 74 09 09 69 46 73 74 50 | 61 67 65 0d 09 69 6e 74 |t..iFstP|age..int|
|00000550| 09 09 69 4c 73 74 50 61 | 67 65 0d 09 69 6e 74 09 |..iLstPa|ge..int.|
|00000560| 09 69 43 6f 70 69 65 73 | 0d 09 62 79 74 65 09 62 |.iCopies|..byte.b|
|00000570| 4a 44 6f 63 4c 6f 6f 70 | 09 5c 20 70 72 69 6e 74 |JDocLoop|.\ print|
|00000580| 20 6d 65 74 68 6f 64 2c | 20 30 3d 64 72 61 66 74 | method,| 0=draft|
|00000590| 20 20 31 3d 73 70 6f 6f | 6c 65 64 0d 09 62 6f 6f | 1=spoo|led..boo|
|000005a0| 6c 09 66 46 72 6f 6d 55 | 73 72 0d 09 70 74 72 09 |l.fFromU|sr..ptr.|
|000005b0| 09 70 49 64 6c 65 50 72 | 6f 63 09 5c 20 62 61 63 |.pIdlePr|oc.\ bac|
|000005c0| 6b 67 72 6f 75 6e 64 20 | 70 72 6f 63 65 64 75 72 |kground |procedur|
|000005d0| 65 0d 09 70 74 72 09 09 | 70 46 69 6c 65 4e 61 6d |e..ptr..|pFileNam|
|000005e0| 65 0d 09 34 20 62 79 74 | 65 73 20 6a 75 6e 6b 0d |e..4 byt|es junk.|
|000005f0| 7d 0d 0d 3a 6d 20 73 70 | 6f 6f 6c 65 64 3f 3a 09 |}..:m sp|ooled?:.|
|00000600| 28 20 2d 2d 20 62 29 0d | 09 67 65 74 3a 20 62 4a |( -- b).|.get: bJ|
|00000610| 44 6f 63 4c 6f 6f 70 20 | 20 31 20 3d 20 3b 6d 0d |DocLoop | 1 = ;m.|
|00000620| 0d 3b 63 6c 61 73 73 0d | 0d 0d 3a 63 6c 61 73 73 |.;class.|..:class|
|00000630| 20 54 48 50 72 69 6e 74 | 09 73 75 70 65 72 7b 20 | THPrint|.super{ |
|00000640| 6f 62 6a 65 63 74 20 7d | 0d 72 65 63 6f 72 64 0d |object }|.record.|
|00000650| 7b 09 69 6e 74 09 09 09 | 69 50 72 56 65 72 73 69 |{.int...|iPrVersi|
|00000660| 6f 6e 0d 09 54 50 72 49 | 6e 66 6f 09 09 70 72 49 |on..TPrI|nfo..prI|
|00000670| 6e 66 6f 0d 09 72 65 63 | 74 09 09 72 50 61 70 65 |nfo..rec|t..rPape|
|00000680| 72 0d 09 54 50 72 53 74 | 6c 09 09 70 72 53 74 6c |r..TPrSt|l..prStl|
|00000690| 0d 09 54 50 72 49 6e 66 | 6f 09 09 70 72 49 6e 66 |..TPrInf|o..prInf|
|000006a0| 6f 50 54 0d 09 31 36 20 | 62 79 74 65 73 09 70 72 |oPT..16 |bytes.pr|
|000006b0| 58 49 6e 66 6f 09 09 5c | 20 6e 6f 74 20 6d 61 70 |XInfo..\| not map|
|000006c0| 70 65 64 20 64 75 65 20 | 74 6f 20 76 65 72 79 20 |ped due |to very |
|000006d0| 6c 69 6d 69 74 65 64 20 | 75 73 65 0d 09 54 50 72 |limited |use..TPr|
|000006e0| 4a 6f 62 09 09 70 72 4a | 6f 62 0d 09 33 38 20 62 |Job..prJ|ob..38 b|
|000006f0| 79 74 65 73 09 70 72 69 | 6e 74 58 0d 7d 0d 0d 3a |ytes.pri|ntX.}..:|
|00000700| 6d 20 73 70 6f 6f 6c 65 | 64 3f 3a 09 28 20 2d 2d |m spoole|d?:.( --|
|00000710| 20 62 29 0d 09 73 70 6f | 6f 6c 65 64 3f 3a 20 70 | b)..spo|oled?: p|
|00000720| 72 4a 6f 62 20 3b 6d 0d | 0d 3b 63 6c 61 73 73 0d |rJob ;m.|.;class.|
|00000730| 0d 0d 3a 63 6c 61 73 73 | 20 20 54 50 72 53 74 61 |..:class| TPrSta|
|00000740| 74 75 73 20 20 73 75 70 | 65 72 7b 20 6f 62 6a 65 |tus sup|er{ obje|
|00000750| 63 74 20 7d 0d 72 65 63 | 6f 72 64 0d 7b 09 69 6e |ct }.rec|ord.{.in|
|00000760| 74 09 09 69 54 6f 74 50 | 61 67 65 73 09 09 5c 20 |t..iTotP|ages..\ |
|00000770| 6e 75 6d 62 65 72 20 6f | 66 20 70 61 67 65 73 20 |number o|f pages |
|00000780| 69 6e 20 73 70 6f 6f 6c | 20 66 69 6c 65 0d 09 69 |in spool| file..i|
|00000790| 6e 74 09 09 69 43 75 72 | 50 61 67 65 09 09 5c 20 |nt..iCur|Page..\ |
|000007a0| 70 61 67 65 20 62 65 69 | 6e 67 20 70 72 69 6e 74 |page bei|ng print|
|000007b0| 65 64 0d 09 69 6e 74 09 | 09 69 54 6f 74 43 6f 70 |ed..int.|.iTotCop|
|000007c0| 69 65 73 09 09 5c 20 6e | 75 6d 62 65 72 20 6f 66 |ies..\ n|umber of|
|000007d0| 20 63 6f 70 69 65 73 20 | 72 65 71 75 65 73 74 65 | copies |requeste|
|000007e0| 64 0d 09 69 6e 74 09 09 | 69 43 75 72 43 6f 70 79 |d..int..|iCurCopy|
|000007f0| 09 09 5c 20 63 6f 70 79 | 20 62 65 69 6e 67 20 70 |..\ copy| being p|
|00000800| 72 69 6e 74 65 64 0d 09 | 69 6e 74 09 09 69 54 6f |rinted..|int..iTo|
|00000810| 74 42 61 6e 64 73 09 09 | 5c 20 75 73 65 64 20 69 |tBands..|\ used i|
|00000820| 6e 74 65 72 6e 61 6c 6c | 79 0d 09 69 6e 74 09 09 |nternall|y..int..|
|00000830| 69 43 75 72 42 61 6e 64 | 09 09 5c 20 75 73 65 64 |iCurBand|..\ used|
|00000840| 20 69 6e 74 65 72 6e 61 | 6c 6c 79 0d 20 20 20 20 | interna|lly. |
|00000850| 62 6f 6f 6c 09 66 50 67 | 44 69 72 74 79 09 09 5c |bool.fPg|Dirty..\|
|00000860| 20 74 72 75 65 20 69 66 | 20 73 74 61 72 74 65 64 | true if| started|
|00000870| 20 70 72 69 6e 74 69 6e | 67 20 70 61 67 65 0d 20 | printin|g page. |
|00000880| 20 20 20 62 6f 6f 6c 09 | 66 49 6d 61 67 69 6e 67 | bool.|fImaging|
|00000890| 09 09 5c 20 75 73 65 64 | 20 69 6e 74 65 72 6e 61 |..\ used| interna|
|000008a0| 6c 6c 79 0d 09 68 61 6e | 64 6c 65 09 68 50 72 69 |lly..han|dle.hPri|
|000008b0| 6e 74 09 09 09 5c 20 70 | 72 69 6e 74 20 72 65 63 |nt...\ p|rint rec|
|000008c0| 6f 72 64 0d 09 76 61 72 | 09 09 70 50 72 50 6f 72 |ord..var|..pPrPor|
|000008d0| 74 09 09 09 5c 20 70 72 | 69 6e 74 69 6e 67 20 67 |t...\ pr|inting g|
|000008e0| 72 61 66 70 6f 72 74 0d | 09 68 61 6e 64 6c 65 09 |rafport.|.handle.|
|000008f0| 68 50 69 63 09 09 09 5c | 20 75 73 65 64 20 69 6e |hPic...\| used in|
|00000900| 74 65 72 6e 61 6c 6c 79 | 0d 7d 0d 3b 63 6c 61 73 |ternally|.}.;clas|
|00000910| 73 0d 0d 0d 3a 63 6c 61 | 73 73 20 50 72 69 6e 74 |s...:cla|ss Print|
|00000920| 4d 61 6e 61 67 65 72 20 | 73 75 70 65 72 7b 20 6f |Manager |super{ o|
|00000930| 62 6a 65 63 74 20 7d 0d | 09 0d 09 68 61 6e 64 6c |bject }.|...handl|
|00000940| 65 20 09 09 68 50 72 69 | 6e 74 0d 09 54 50 72 53 |e ..hPri|nt..TPrS|
|00000950| 74 61 74 75 73 09 70 72 | 53 74 61 74 75 73 0d 09 |tatus.pr|Status..|
|00000960| 78 2d 61 64 64 72 09 09 | 64 72 61 77 09 5c 20 64 |x-addr..|draw.\ d|
|00000970| 72 61 77 20 68 61 6e 64 | 6c 65 72 20 66 6f 72 20 |raw hand|ler for |
|00000980| 70 72 69 6e 74 69 6e 67 | 0d 09 0d 0d 3a 6d 20 70 |printing|....:m p|
|00000990| 75 74 3a 09 28 20 63 66 | 61 20 2d 2d 20 29 0d 09 |ut:.( cf|a -- )..|
|000009a0| 70 75 74 3a 20 64 72 61 | 77 20 3b 6d 0d 0d 3a 6d |put: dra|w ;m..:m|
|000009b0| 20 6e 65 77 3a 09 09 5c | 20 6d 75 73 74 20 63 61 | new:..\| must ca|
|000009c0| 6c 6c 20 6e 65 77 3a 20 | 6f 6e 6c 79 20 6f 6e 63 |ll new: |only onc|
|000009d0| 65 20 61 74 20 72 75 6e | 74 69 6d 65 20 74 6f 20 |e at run|time to |
|000009e0| 61 6c 6c 6f 63 61 74 65 | 20 70 72 69 6e 74 20 72 |allocate| print r|
|000009f0| 65 63 6f 72 64 0d 09 5b | 27 5d 20 54 48 50 72 69 |ecord..[|'] THPri|
|00000a00| 6e 74 20 44 61 74 61 4c | 65 6e 67 74 68 20 20 6e |nt DataL|ength n|
|00000a10| 65 77 3a 20 68 50 72 69 | 6e 74 20 3b 6d 0d 0d 3a |ew: hPri|nt ;m..:|
|00000a20| 6d 20 67 65 74 6e 65 77 | 3a 09 5c 20 74 68 69 73 |m getnew|:.\ this|
|00000a30| 20 6d 65 74 68 6f 64 20 | 73 68 6f 75 6c 64 20 6f | method |should o|
|00000a40| 62 74 61 69 6e 20 61 20 | 70 72 69 6e 74 20 72 65 |btain a |print re|
|00000a50| 63 6f 72 64 20 66 72 6f | 6d 20 74 68 65 20 72 65 |cord fro|m the re|
|00000a60| 73 6f 75 72 63 65 0d 09 | 5c 20 66 6f 72 6b 20 6f |source..|\ fork o|
|00000a70| 66 20 74 68 65 20 66 69 | 6c 65 2c 20 69 66 20 61 |f the fi|le, if a|
|00000a80| 20 66 69 6c 65 20 65 78 | 69 73 74 73 20 74 68 61 | file ex|ists tha|
|00000a90| 74 20 69 73 20 28 20 73 | 65 65 20 50 61 67 65 53 |t is ( s|ee PageS|
|00000aa0| 65 74 75 70 3a 20 63 6f | 6d 6d 65 6e 74 73 0d 09 |etup: co|mments..|
|00000ab0| 5c 20 61 6e 64 20 73 65 | 65 20 49 4d 20 49 49 2d |\ and se|e IM II-|
|00000ac0| 31 35 30 20 4e 6f 74 65 | 3a 20 29 0d 09 5c 20 54 |150 Note|: )..\ T|
|00000ad0| 68 69 73 20 6d 65 74 68 | 6f 64 20 69 73 20 6e 6f |his meth|od is no|
|00000ae0| 74 20 69 6d 70 6c 65 6d | 65 6e 74 65 64 20 68 65 |t implem|ented he|
|00000af0| 72 65 2c 20 62 75 74 20 | 77 6f 75 6c 64 20 62 65 |re, but |would be|
|00000b00| 20 75 73 65 64 20 69 6e | 20 70 6c 61 63 65 20 6f | used in| place o|
|00000b10| 66 20 6e 65 77 3a 2e 0d | 09 3b 6d 0d 0d 3a 6d 20 |f new:..|.;m..:m |
|00000b20| 72 65 6c 65 61 73 65 3a | 0d 09 72 65 6c 65 61 73 |release:|..releas|
|00000b30| 65 3a 20 68 50 72 69 6e | 74 20 3b 6d 0d 0d 3a 6d |e: hPrin|t ;m..:m|
|00000b40| 20 50 61 67 65 53 65 74 | 75 70 3a 09 28 20 2d 2d | PageSet|up:.( --|
|00000b50| 20 62 29 09 5c 20 72 75 | 6e 64 69 61 6c 6f 67 2c | b).\ ru|ndialog,|
|00000b60| 20 72 65 74 75 72 6e 73 | 20 30 20 69 66 20 75 73 | returns| 0 if us|
|00000b70| 65 72 20 63 61 6e 63 65 | 6c 0d 09 5c 20 69 66 20 |er cance|l..\ if |
|00000b80| 75 73 65 72 20 64 69 64 | 20 6e 6f 74 20 63 61 6e |user did| not can|
|00000b90| 63 65 6c 2c 20 69 74 20 | 6d 69 67 68 74 20 62 65 |cel, it |might be|
|00000ba0| 20 61 20 67 6f 6f 64 20 | 69 64 65 61 20 74 6f 20 | a good |idea to |
|00000bb0| 73 61 76 65 20 74 68 65 | 20 68 70 72 69 6e 74 20 |save the| hprint |
|00000bc0| 72 65 63 6f 72 64 0d 09 | 5c 20 74 6f 20 64 69 73 |record..|\ to dis|
|00000bd0| 6b 20 73 6f 20 74 68 65 | 20 70 72 69 6e 74 69 6e |k so the| printin|
|00000be0| 67 20 70 61 72 61 6d 65 | 74 65 72 73 20 63 68 6f |g parame|ters cho|
|00000bf0| 73 65 6e 20 62 79 20 74 | 68 65 20 75 73 65 72 20 |sen by t|he user |
|00000c00| 63 61 6e 20 62 65 20 72 | 65 73 74 6f 72 65 64 2e |can be r|estored.|
|00000c10| 0d 09 5c 20 42 75 74 20 | 74 68 69 73 20 72 65 73 |..\ But |this res|
|00000c20| 74 6f 72 61 74 69 6f 6e | 20 69 73 20 6e 6f 74 20 |toration| is not |
|00000c30| 61 75 74 6f 6d 61 74 69 | 63 20 61 6e 64 20 6d 75 |automati|c and mu|
|00000c40| 73 74 20 62 65 20 64 6f | 6e 65 20 62 79 20 74 68 |st be do|ne by th|
|00000c50| 65 20 70 72 6f 67 72 61 | 6d 2e 0d 09 63 61 6c 6c |e progra|m...call|
|00000c60| 20 50 72 4f 70 65 6e 0d | 09 50 72 45 72 72 6f 72 | PrOpen.|.PrError|
|00000c70| 20 30 3d 0d 09 49 46 0d | 09 09 67 65 74 3a 20 68 | 0=..IF.|..get: h|
|00000c80| 50 72 69 6e 74 20 50 72 | 53 74 6c 44 69 61 6c 6f |Print Pr|StlDialo|
|00000c90| 67 0d 09 54 48 45 4e 0d | 09 63 61 6c 6c 20 50 72 |g..THEN.|.call Pr|
|00000ca0| 43 6c 6f 73 65 20 3b 6d | 0d 0d 70 72 69 76 61 74 |Close ;m|..privat|
|00000cb0| 65 0d 0d 5c 20 6e 6f 74 | 65 2c 20 6f 6e 6c 79 20 |e..\ not|e, only |
|00000cc0| 70 72 69 6e 74 69 6e 67 | 20 6f 6e 65 20 70 61 67 |printing| one pag|
|00000cd0| 65 20 68 65 72 65 20 28 | 20 73 6f 20 74 68 69 73 |e here (| so this|
|00000ce0| 20 69 73 6e 27 74 20 72 | 65 61 6c 6c 79 20 61 20 | isn't r|eally a |
|00000cf0| 6c 6f 6f 70 29 0d 3a 6d | 20 70 72 69 6e 74 4c 6f |loop).:m| printLo|
|00000d00| 6f 70 3a 09 7b 20 5c 20 | 70 50 72 50 6f 72 74 20 |op:.{ \ |pPrPort |
|00000d10| 2d 2d 20 7d 0d 09 67 65 | 74 3a 20 68 50 72 69 6e |-- }..ge|t: hPrin|
|00000d20| 74 20 30 20 30 20 50 72 | 4f 70 65 6e 44 6f 63 20 |t 0 0 Pr|OpenDoc |
|00000d30| 2d 3e 20 70 50 72 50 6f | 72 74 0d 09 50 72 45 72 |-> pPrPo|rt..PrEr|
|00000d40| 72 6f 72 20 30 3d 0d 09 | 49 46 0d 09 09 70 50 72 |ror 0=..|IF...pPr|
|00000d50| 50 6f 72 74 20 30 20 63 | 61 6c 6c 20 50 72 4f 70 |Port 0 c|all PrOp|
|00000d60| 65 6e 50 61 67 65 09 5c | 20 70 50 61 67 65 46 72 |enPage.\| pPageFr|
|00000d70| 61 6d 65 3d 30 2c 20 73 | 6f 20 6e 6f 20 73 63 61 |ame=0, s|o no sca|
|00000d80| 6c 69 6e 67 0d 09 09 50 | 72 45 72 72 6f 72 20 30 |ling...P|rError 0|
|00000d90| 3d 0d 09 09 49 46 0d 09 | 09 09 65 78 65 63 3a 20 |=...IF..|..exec: |
|00000da0| 64 72 61 77 0d 09 09 54 | 48 45 4e 0d 09 09 70 50 |draw...T|HEN...pP|
|00000db0| 72 50 6f 72 74 20 63 61 | 6c 6c 20 50 72 43 6c 6f |rPort ca|ll PrClo|
|00000dc0| 73 65 50 61 67 65 0d 09 | 54 48 45 4e 0d 09 70 50 |sePage..|THEN..pP|
|00000dd0| 72 50 6f 72 74 20 63 61 | 6c 6c 20 50 72 43 6c 6f |rPort ca|ll PrClo|
|00000de0| 73 65 44 6f 63 0d 09 0d | 09 50 72 45 72 72 6f 72 |seDoc...|.PrError|
|00000df0| 20 30 3d 0d 09 70 74 72 | 3a 20 68 50 72 69 6e 74 | 0=..ptr|: hPrint|
|00000e00| 20 20 73 70 6f 6f 6c 65 | 64 3f 3a 20 54 48 50 72 | spoole|d?: THPr|
|00000e10| 69 6e 74 20 20 61 6e 64 | 09 09 5c 20 6e 6f 74 65 |int and|..\ note|
|00000e20| 20 6d 65 73 73 61 67 65 | 20 74 6f 20 63 6c 61 73 | message| to clas|
|00000e30| 73 20 54 48 50 72 69 6e | 74 0d 09 09 49 46 0d 09 |s THPrin|t...IF..|
|00000e40| 09 09 67 65 74 3a 20 68 | 50 72 69 6e 74 20 30 20 |..get: h|Print 0 |
|00000e50| 30 20 30 20 61 64 64 72 | 3a 20 70 72 53 74 61 74 |0 0 addr|: prStat|
|00000e60| 75 73 20 63 61 6c 6c 20 | 50 72 50 69 63 46 69 6c |us call |PrPicFil|
|00000e70| 65 0d 09 09 54 48 45 4e | 0d 3b 6d 0d 09 0d 70 75 |e...THEN|.;m...pu|
|00000e80| 62 6c 69 63 0d 0d 3a 6d | 20 50 72 69 6e 74 3a 0d |blic..:m| Print:.|
|00000e90| 09 63 61 6c 6c 20 50 72 | 4f 70 65 6e 0d 09 50 72 |.call Pr|Open..Pr|
|00000ea0| 45 72 72 6f 72 20 30 3d | 0d 09 49 46 0d 09 09 70 |Error 0=|..IF...p|
|00000eb0| 75 73 68 70 6f 72 74 0d | 09 09 0d 09 09 67 65 74 |ushport.|.....get|
|00000ec0| 3a 20 68 50 72 69 6e 74 | 20 50 72 4a 6f 62 44 69 |: hPrint| PrJobDi|
|00000ed0| 61 6c 6f 67 0d 09 09 49 | 46 20 70 72 69 6e 74 4c |alog...I|F printL|
|00000ee0| 6f 6f 70 3a 20 73 65 6c | 66 20 54 48 45 4e 0d 09 |oop: sel|f THEN..|
|00000ef0| 09 0d 09 09 70 6f 70 70 | 6f 72 74 0d 09 54 48 45 |....popp|ort..THE|
|00000f00| 4e 0d 09 63 61 6c 6c 20 | 50 72 43 6c 6f 73 65 20 |N..call |PrClose |
|00000f10| 3b 6d 0d 0d 3b 63 6c 61 | 73 73 0d 0d 50 72 69 6e |;m..;cla|ss..Prin|
|00000f20| 74 4d 61 6e 61 67 65 72 | 20 20 70 6d 09 5c 20 69 |tManager| pm.\ i|
|00000f30| 6e 73 74 61 6e 74 69 61 | 74 65 20 61 6e 20 6f 62 |nstantia|te an ob|
|00000f40| 6a 65 63 74 2c 20 6e 61 | 6d 65 64 20 70 6d 2c 20 |ject, na|med pm, |
|00000f50| 74 6f 20 64 6f 20 61 6c | 6c 20 70 72 69 6e 74 69 |to do al|l printi|
|00000f60| 6e 67 20 77 6f 72 6b 0d | 0d 65 6e 64 6c 6f 61 64 |ng work.|.endload|
|00000f70| 0d 0d 0d 0d 0d 2a 2a 2a | 2a 2a 2a 2a 2a 2a 20 45 |.....***|****** E|
|00000f80| 78 61 6d 70 6c 65 20 75 | 73 61 67 65 20 6f 66 20 |xample u|sage of |
|00000f90| 50 72 69 6e 74 20 4d 61 | 6e 61 67 65 72 20 2a 2a |Print Ma|nager **|
|00000fa0| 2a 2a 2a 2a 2a 2a 2a 2a | 0d 0d 3a 20 74 65 73 74 |********|..: test|
|00000fb0| 50 72 69 6e 74 0d 09 33 | 30 20 33 30 20 38 30 20 |Print..3|0 30 80 |
|00000fc0| 38 30 20 70 75 74 3a 20 | 74 65 6d 70 72 65 63 74 |80 put: |temprect|
|00000fd0| 0d 09 64 72 61 77 3a 20 | 74 65 6d 70 72 65 63 74 |..draw: |temprect|
|00000fe0| 20 3b 0d 0d 27 20 74 65 | 73 74 50 72 69 6e 74 20 | ;..' te|stPrint |
|00000ff0| 70 75 74 3a 20 70 6d 09 | 09 5c 20 70 75 74 20 74 |put: pm.|.\ put t|
|00001000| 68 65 20 64 72 61 77 20 | 61 63 74 69 6f 6e 20 69 |he draw |action i|
|00001010| 6e 20 6f 75 72 20 50 72 | 69 6e 74 4d 61 6e 61 67 |n our Pr|intManag|
|00001020| 65 72 20 6f 62 6a 65 63 | 74 0d 0d 0d 6e 65 77 3a |er objec|t...new:|
|00001030| 20 70 6d 09 09 09 09 09 | 5c 20 6d 75 73 74 20 61 | pm.....|\ must a|
|00001040| 6c 77 61 79 73 20 63 61 | 6c 6c 20 6e 65 77 3a 20 |lways ca|ll new: |
|00001050| 6f 6e 6c 79 20 6f 6e 63 | 65 20 61 74 20 72 75 6e |only onc|e at run|
|00001060| 74 69 6d 65 0d 0d 50 61 | 67 65 53 65 74 75 70 3a |time..Pa|geSetup:|
|00001070| 20 70 6d 20 2e 09 09 09 | 5c 20 6e 6f 74 20 72 65 | pm ....|\ not re|
|00001080| 71 75 69 72 65 64 2c 20 | 62 75 74 20 64 6f 65 73 |quired, |but does|
|00001090| 20 77 68 61 74 20 69 74 | 20 73 61 79 73 0d 50 72 | what it| says.Pr|
|000010a0| 69 6e 74 3a 20 70 6d 09 | 09 09 09 5c 20 6c 65 74 |int: pm.|...\ let|
|000010b0| 20 65 72 20 72 69 70 0d | 0d 72 65 6c 65 61 73 65 | er rip.|.release|
|000010c0| 3a 20 70 6d 09 09 09 5c | 20 6e 6f 74 20 72 65 71 |: pm...\| not req|
|000010d0| 75 69 72 65 64 20 74 69 | 6c 6c 20 71 75 69 74 74 |uired ti|ll quitt|
|000010e0| 69 6e 67 2c 20 69 2e 65 | 2e 20 63 61 6e 20 64 6f |ing, i.e|. can do|
|000010f0| 20 6d 75 6c 74 69 70 6c | 65 20 50 72 69 6e 74 3a | multipl|e Print:|
|00001100| 27 73 0d 09 09 09 09 09 | 5c 20 77 69 74 68 6f 75 |'s......|\ withou|
|00001110| 74 20 63 61 6c 6c 69 6e | 67 20 74 68 69 73 2e 20 |t callin|g this. |
|00001120| 20 54 68 69 73 20 6a 75 | 73 74 20 72 65 6c 65 61 | This ju|st relea|
|00001130| 73 65 73 20 73 6f 6d 65 | 20 6d 65 6d 6f 72 79 2e |ses some| memory.|
|00001140| 0d 0d 0d 0d 2a 2a 2a 2a | 2a 2a 20 50 6f 73 73 69 |....****|** Possi|
|00001150| 62 6c 65 20 45 6e 68 61 | 6e 63 65 6d 65 6e 74 73 |ble Enha|ncements|
|00001160| 20 2a 2a 2a 2a 2a 2a 2a | 2a 0d 0d 4f 66 20 63 6f | *******|*..Of co|
|00001170| 75 72 73 65 2c 20 77 65 | 20 6e 65 65 64 20 74 6f |urse, we| need to|
|00001180| 20 63 79 63 6c 65 20 74 | 68 72 6f 75 67 68 20 61 | cycle t|hrough a|
|00001190| 6e 64 20 70 72 69 6e 74 | 20 65 61 63 68 20 72 65 |nd print| each re|
|000011a0| 71 75 65 73 74 65 64 20 | 70 61 67 65 2e 0d 0d 49 |quested |page...I|
|000011b0| 20 74 68 69 6e 6b 20 61 | 20 62 65 74 74 65 72 20 | think a| better |
|000011c0| 70 72 69 6e 74 69 6e 67 | 20 6d 6f 64 65 6c 20 63 |printing| model c|
|000011d0| 6f 75 6c 64 20 62 65 20 | 61 63 68 69 65 76 65 64 |ould be |achieved|
|000011e0| 20 62 79 20 68 61 76 69 | 6e 67 20 61 20 22 20 70 | by havi|ng a " p|
|000011f0| 72 69 6e 74 20 6f 62 6a | 65 63 74 22 0d 69 6e 73 |rint obj|ect".ins|
|00001200| 74 61 6e 63 65 20 76 61 | 72 69 61 62 6c 65 20 69 |tance va|riable i|
|00001210| 6e 20 74 68 65 20 50 72 | 69 6e 74 4d 61 6e 61 67 |n the Pr|intManag|
|00001220| 65 72 20 63 6c 61 73 73 | 2e 20 20 49 74 20 77 6f |er class|. It wo|
|00001230| 75 6c 64 20 73 69 6d 70 | 6c 79 20 62 65 20 73 65 |uld simp|ly be se|
|00001240| 6e 74 20 61 20 0d 70 72 | 69 6e 74 3a 20 6d 65 73 |nt a .pr|int: mes|
|00001250| 73 61 67 65 20 61 74 20 | 74 68 65 20 63 6f 72 72 |sage at |the corr|
|00001260| 65 63 74 20 74 69 6d 65 | 2c 20 72 61 74 68 65 72 |ect time|, rather|
|00001270| 20 74 68 61 6e 20 73 65 | 6e 64 69 6e 67 20 65 78 | than se|nding ex|
|00001280| 65 63 3a 20 74 6f 20 61 | 6e 20 78 2d 61 64 64 72 |ec: to a|n x-addr|
|00001290| 0d 61 73 20 69 73 20 64 | 6f 6e 65 20 68 65 72 65 |.as is d|one here|
|000012a0| 2e 20 20 49 20 74 68 69 | 6e 6b 20 69 74 20 77 6f |. I thi|nk it wo|
|000012b0| 75 6c 64 20 62 65 20 6d | 6f 72 65 20 66 6c 65 78 |uld be m|ore flex|
|000012c0| 69 62 6c 65 20 61 6e 64 | 20 72 6f 62 75 73 74 20 |ible and| robust |
|000012d0| 74 6f 20 68 61 76 65 20 | 74 68 65 0d 50 72 69 6e |to have |the.Prin|
|000012e0| 74 4d 61 6e 61 67 65 72 | 20 6f 62 6a 65 63 74 20 |tManager| object |
|000012f0| 63 6f 6d 6d 75 6e 69 63 | 61 74 65 20 77 69 74 68 |communic|ate with|
|00001300| 20 61 20 70 72 69 6e 74 | 20 6f 62 6a 65 63 74 2e | a print| object.|
|00001310| 0d 0d 49 74 20 77 6f 75 | 6c 64 20 70 72 6f 62 61 |..It wou|ld proba|
|00001320| 62 6c 79 20 6d 61 6b 65 | 20 73 65 6e 73 65 20 74 |bly make| sense t|
|00001330| 6f 20 68 61 76 65 20 70 | 72 69 6e 74 69 6e 67 20 |o have p|rinting |
|00001340| 62 65 20 61 20 66 75 6e | 63 74 69 6f 6e 20 6f 66 |be a fun|ction of|
|00001350| 20 74 68 65 0d 70 61 67 | 65 20 72 65 63 74 61 6e | the.pag|e rectan|
|00001360| 67 6c 65 20 61 6e 64 20 | 70 61 67 65 20 6e 75 6d |gle and |page num|
|00001370| 62 65 72 2e 20 20 53 6f | 20 74 68 65 20 70 72 69 |ber. So| the pri|
|00001380| 6e 74 20 6f 62 6a 65 63 | 74 20 77 6f 75 6c 64 20 |nt objec|t would |
|00001390| 61 6c 77 61 79 73 0d 62 | 65 20 70 61 73 73 65 64 |always.b|e passed|
|000013a0| 20 74 68 69 73 20 69 6e | 66 6f 72 6d 61 74 69 6f | this in|formatio|
|000013b0| 6e 20 77 68 65 6e 20 61 | 20 70 61 67 65 20 69 73 |n when a| page is|
|000013c0| 20 72 65 71 75 65 73 74 | 65 64 20 74 6f 20 62 65 | request|ed to be|
|000013d0| 20 64 72 61 77 6e 2e 0d | 41 6e 64 20 70 72 6f 62 | drawn..|And prob|
|000013e0| 61 62 6c 79 20 74 68 65 | 20 6d 65 73 73 61 67 65 |ably the| message|
|000013f0| 20 73 68 6f 75 6c 64 20 | 62 65 20 50 72 69 6e 74 | should |be Print|
|00001400| 50 61 67 65 3a 20 77 69 | 74 68 20 74 68 65 20 72 |Page: wi|th the r|
|00001410| 65 63 74 61 6e 67 6c 65 | 20 61 6e 64 0d 70 61 67 |ectangle| and.pag|
|00001420| 65 20 6e 75 6d 62 65 72 | 20 70 61 73 73 65 64 20 |e number| passed |
|00001430| 61 73 20 70 61 72 61 6d | 65 74 65 72 73 20 74 6f |as param|eters to|
|00001440| 20 74 68 65 20 70 72 69 | 6e 74 20 6f 62 6a 65 63 | the pri|nt objec|
|00001450| 74 2e 0d 0d 41 6c 73 6f | 2c 20 61 20 77 61 79 20 |t...Also|, a way |
|00001460| 74 6f 20 65 61 73 69 6c | 79 20 73 61 76 65 20 61 |to easil|y save a|
|00001470| 6e 64 20 72 65 73 74 6f | 72 65 20 74 68 65 20 74 |nd resto|re the t|
|00001480| 68 65 20 70 61 67 65 20 | 73 65 74 75 70 20 70 61 |he page |setup pa|
|00001490| 72 61 6d 65 74 65 72 73 | 20 69 6e 20 61 0d 66 69 |rameters| in a.fi|
|000014a0| 6c 65 27 73 20 72 65 73 | 6f 75 72 63 65 20 66 6f |le's res|ource fo|
|000014b0| 72 6b 20 77 6f 75 6c 64 | 20 62 65 20 6e 69 63 65 |rk would| be nice|
|000014c0| 2e 20 20 53 65 65 20 73 | 75 67 67 65 73 74 65 64 |. See s|uggested|
|000014d0| 20 6d 65 73 73 61 67 65 | 20 67 65 74 6e 65 77 3a | message| getnew:|
|000014e0| 2e 0d 0d 53 49 6e 63 65 | 20 6e 6f 20 62 61 63 6b |...SInce| no back|
|000014f0| 67 72 6f 75 6e 64 20 70 | 72 6f 63 65 64 75 72 65 |ground p|rocedure|
|00001500| 20 69 73 20 70 72 6f 76 | 69 64 65 64 2c 20 74 68 | is prov|ided, th|
|00001510| 65 20 74 6f 6f 6c 62 6f | 78 20 77 69 6c 6c 20 64 |e toolbo|x will d|
|00001520| 65 66 61 75 6c 74 20 74 | 6f 0d 63 61 6e 63 65 6c |efault t|o.cancel|
|00001530| 6c 69 6e 67 20 75 70 6f | 6e 20 63 6f 6d 6d 61 6e |ling upo|n comman|
|00001540| 64 2d 70 65 72 69 6f 64 | 2e 20 20 53 65 65 20 49 |d-period|. See I|
|00001550| 4d 20 49 49 2d 31 35 32 | 2c 31 35 33 2e 20 20 42 |M II-152|,153. B|
|00001560| 75 74 20 69 74 20 73 68 | 6f 75 6c 64 6e 27 74 20 |ut it sh|ouldn't |
|00001570| 62 65 0d 64 69 66 66 69 | 63 75 6c 74 20 74 6f 20 |be.diffi|cult to |
|00001580| 70 72 6f 76 69 64 65 20 | 61 20 63 75 73 74 6f 6d |provide |a custom|
|00001590| 20 62 61 63 6b 67 72 6f | 75 6e 64 20 70 72 6f 63 | backgro|und proc|
|000015a0| 65 64 75 72 65 2e 0d 0d | 0d 2a 2a 2a 2a 2a 2a 20 |edure...|.****** |
|000015b0| 43 6f 6d 6d 65 6e 74 73 | 20 2a 2a 2a 2a 2a 2a 2a |Comments| *******|
|000015c0| 0d 0d 4e 6f 74 65 20 74 | 68 65 20 75 73 65 20 6f |..Note t|he use o|
|000015d0| 66 20 61 20 63 6c 61 73 | 73 20 64 65 66 69 6e 69 |f a clas|s defini|
|000015e0| 74 69 6f 6e 20 74 6f 20 | 6d 61 70 20 69 6e 74 6f |tion to |map into|
|000015f0| 20 61 20 74 6f 6f 6c 62 | 6f 78 2d 63 72 65 61 74 | a toolb|ox-creat|
|00001600| 65 64 20 72 65 63 6f 72 | 64 2c 0d 69 6e 20 74 68 |ed recor|d,.in th|
|00001610| 69 73 20 63 61 73 65 20 | 74 68 65 20 54 48 50 72 |is case |the THPr|
|00001620| 69 6e 74 20 72 65 63 6f | 72 64 2e 20 20 49 6e 20 |int reco|rd. In |
|00001630| 74 68 65 20 70 72 69 6e | 74 4c 6f 6f 70 3a 20 6d |the prin|tLoop: m|
|00001640| 65 74 68 6f 64 20 6f 66 | 20 63 6c 61 73 73 20 50 |ethod of| class P|
|00001650| 72 69 6e 74 4d 61 6e 61 | 67 65 72 0d 77 65 20 6e |rintMana|ger.we n|
|00001660| 65 65 64 20 74 6f 20 61 | 63 63 65 73 73 20 61 20 |eed to a|ccess a |
|00001670| 6d 65 6d 62 65 72 20 6f | 66 20 61 20 72 65 63 6f |member o|f a reco|
|00001680| 72 64 20 74 68 61 74 20 | 69 73 20 63 6f 6e 74 61 |rd that |is conta|
|00001690| 69 6e 65 64 20 69 6e 20 | 61 20 73 75 62 72 65 63 |ined in |a subrec|
|000016a0| 6f 72 64 2c 20 69 6e 0d | 74 68 69 73 20 63 61 73 |ord, in.|this cas|
|000016b0| 65 20 62 6a 44 6f 63 4c | 6f 6f 70 20 28 6d 65 6d |e bjDocL|oop (mem|
|000016c0| 62 65 72 20 6f 66 20 54 | 50 72 4a 6f 62 2c 20 77 |ber of T|PrJob, w|
|000016d0| 68 69 63 68 20 69 73 20 | 61 20 73 75 62 72 65 63 |hich is |a subrec|
|000016e0| 6f 72 64 20 6f 66 20 54 | 48 50 72 69 6e 74 29 2e |ord of T|HPrint).|
|000016f0| 0d 4e 6f 77 20 77 65 20 | 63 6f 75 6c 64 20 68 61 |.Now we |could ha|
|00001700| 76 65 20 73 69 6d 70 6c | 79 20 6f 62 74 61 69 6e |ve simpl|y obtain|
|00001710| 65 64 20 74 68 65 20 70 | 6f 69 6e 74 65 72 20 74 |ed the p|ointer t|
|00001720| 6f 20 74 68 65 20 70 72 | 69 6e 74 20 72 65 63 6f |o the pr|int reco|
|00001730| 72 64 2c 20 61 64 64 65 | 64 0d 74 68 65 20 63 6f |rd, adde|d.the co|
|00001740| 72 72 65 63 74 20 6f 66 | 66 73 65 74 2c 20 61 6e |rrect of|fset, an|
|00001750| 64 20 70 65 72 66 6f 72 | 6d 65 64 20 61 20 63 40 |d perfor|med a c@|
|00001760| 3a 0d 0d 09 70 74 72 3a | 20 68 50 72 69 6e 74 20 |:...ptr:| hPrint |
|00001770| 20 6f 66 66 73 65 74 20 | 2b 20 63 40 0d 09 0d 42 | offset |+ c@...B|
|00001780| 75 74 20 74 68 65 72 65 | 20 61 72 65 20 73 6f 6d |ut there| are som|
|00001790| 65 20 70 72 6f 62 6c 65 | 6d 73 20 77 69 74 68 20 |e proble|ms with |
|000017a0| 74 68 69 73 20 61 70 70 | 72 6f 61 63 68 2c 20 65 |this app|roach, e|
|000017b0| 76 65 6e 20 74 68 6f 75 | 67 68 20 69 74 20 6d 61 |ven thou|gh it ma|
|000017c0| 79 20 73 65 65 6d 20 6d | 6f 72 65 0d 73 74 72 61 |y seem m|ore.stra|
|000017d0| 69 67 68 74 66 6f 72 77 | 61 72 64 2e 20 20 46 69 |ightforw|ard. Fi|
|000017e0| 72 73 74 2c 20 6f 6e 65 | 20 6d 75 73 74 20 63 6f |rst, one| must co|
|000017f0| 6d 70 75 74 65 20 74 68 | 65 20 6f 66 66 73 65 74 |mpute th|e offset|
|00001800| 2e 20 20 49 20 68 61 76 | 65 20 6e 6f 20 69 64 65 |. I hav|e no ide|
|00001810| 61 20 77 68 61 74 20 69 | 74 0d 69 73 2c 20 6e 6f |a what i|t.is, no|
|00001820| 72 20 64 6f 20 49 20 77 | 69 73 68 20 74 6f 20 6b |r do I w|ish to k|
|00001830| 6e 6f 77 2e 20 20 53 65 | 63 6f 6e 64 2c 20 6f 6e |now. Se|cond, on|
|00001840| 65 20 6d 75 73 74 20 72 | 65 6d 65 6d 62 65 72 20 |e must r|emember |
|00001850| 74 6f 20 70 65 72 66 6f | 72 6d 20 74 68 65 20 63 |to perfo|rm the c|
|00001860| 6f 72 72 65 63 74 0d 74 | 79 70 65 20 6f 66 20 22 |orrect.t|ype of "|
|00001870| 66 65 74 63 68 22 20 28 | 63 40 20 68 65 72 65 2c |fetch" (|c@ here,|
|00001880| 20 6f 72 20 77 61 73 20 | 69 74 20 63 40 78 3f 29 | or was |it c@x?)|
|00001890| 2e 20 20 54 68 69 72 64 | 6c 79 2c 20 49 20 64 6f |. Third|ly, I do|
|000018a0| 6e 27 74 20 74 68 69 6e | 6b 20 69 74 20 69 73 20 |n't thin|k it is |
|000018b0| 76 65 72 79 0d 63 6c 65 | 61 72 20 77 68 61 74 20 |very.cle|ar what |
|000018c0| 69 73 20 67 6f 69 6e 67 | 20 6f 6e 20 68 65 72 65 |is going| on here|
|000018d0| 2e 0d 0d 49 6e 73 74 65 | 61 64 2c 20 49 20 62 65 |...Inste|ad, I be|
|000018e0| 6c 69 65 76 65 20 61 20 | 62 65 74 74 65 72 20 61 |lieve a |better a|
|000018f0| 70 70 72 6f 61 63 68 20 | 69 73 20 74 6f 20 64 65 |pproach |is to de|
|00001900| 66 69 6e 65 20 74 68 65 | 20 72 65 63 6f 72 64 73 |fine the| records|
|00001910| 20 61 73 20 63 6c 61 73 | 73 65 73 2c 0d 64 65 66 | as clas|ses,.def|
|00001920| 69 6e 65 20 74 68 65 20 | 72 65 71 75 69 72 65 64 |ine the |required|
|00001930| 20 61 63 63 65 73 73 20 | 6d 65 74 68 6f 64 73 2c | access |methods,|
|00001940| 20 61 6e 64 20 74 68 65 | 6e 20 70 61 73 73 20 61 | and the|n pass a|
|00001950| 20 6d 65 73 73 61 67 65 | 20 74 6f 20 61 20 63 6c | message| to a cl|
|00001960| 61 73 73 20 77 69 74 68 | 0d 74 68 65 20 61 70 70 |ass with|.the app|
|00001970| 72 6f 70 72 69 61 74 65 | 20 62 61 73 65 20 61 64 |ropriate| base ad|
|00001980| 64 72 65 73 73 20 6f 6e | 20 74 68 65 20 73 74 61 |dress on| the sta|
|00001990| 63 6b 3a 0d 0d 09 70 74 | 72 3a 20 68 50 72 69 6e |ck:...pt|r: hPrin|
|000019a0| 74 20 20 20 73 70 6f 6f | 6c 65 64 3f 3a 20 54 48 |t spoo|led?: TH|
|000019b0| 50 72 69 6e 74 0d 0d 48 | 65 72 65 20 74 68 65 20 |Print..H|ere the |
|000019c0| 73 70 6f 6f 6c 65 64 3f | 3a 20 6d 65 73 73 61 67 |spooled?|: messag|
|000019d0| 65 20 77 69 6c 6c 20 62 | 65 20 70 61 73 73 65 64 |e will b|e passed|
|000019e0| 20 62 79 20 63 6c 61 73 | 73 20 54 48 50 72 69 6e | by clas|s THPrin|
|000019f0| 74 20 74 6f 20 69 74 73 | 20 70 72 4a 6f 62 20 69 |t to its| prJob i|
|00001a00| 76 61 72 0d 77 68 69 63 | 68 20 77 69 6c 6c 20 6f |var.whic|h will o|
|00001a10| 62 74 61 69 6e 20 74 68 | 65 20 76 61 6c 75 65 20 |btain th|e value |
|00001a20| 6f 66 20 62 6a 44 6f 63 | 4c 6f 6f 70 20 63 6f 6e |of bjDoc|Loop con|
|00001a30| 74 61 69 6e 65 64 20 69 | 6e 20 74 68 65 20 72 65 |tained i|n the re|
|00001a40| 63 6f 72 64 20 70 6f 69 | 6e 74 65 64 20 74 6f 0d |cord poi|nted to.|
|00001a50| 62 79 20 20 70 74 72 3a | 20 68 50 72 69 6e 74 2e |by ptr:| hPrint.|
|00001a60| 0d 0d 4f 6e 65 20 6d 75 | 73 74 20 62 65 20 63 61 |..One mu|st be ca|
|00001a70| 72 65 66 75 6c 20 77 68 | 65 6e 20 70 61 73 73 69 |reful wh|en passi|
|00001a80| 6e 67 20 61 20 6d 65 73 | 73 61 67 65 20 74 6f 20 |ng a mes|sage to |
|00001a90| 61 20 63 6c 61 73 73 20 | 74 68 61 74 20 74 68 65 |a class |that the|
|00001aa0| 20 61 64 64 72 65 73 73 | 0d 6f 6e 20 74 68 65 20 | address|.on the |
|00001ab0| 73 74 61 63 6b 20 72 65 | 61 6c 6c 79 20 64 6f 65 |stack re|ally doe|
|00001ac0| 73 20 70 6f 69 6e 74 20 | 74 6f 20 61 20 64 61 74 |s point |to a dat|
|00001ad0| 61 20 73 74 72 75 63 74 | 75 72 65 20 74 68 61 74 |a struct|ure that|
|00001ae0| 20 6d 61 74 63 68 65 73 | 20 74 68 65 20 63 6c 61 | matches| the cla|
|00001af0| 73 73 2e 0d 54 68 65 20 | 6f 66 66 73 65 74 20 28 |ss..The |offset (|
|00001b00| 74 6f 20 62 6a 44 6f 63 | 4c 6f 6f 70 29 20 69 73 |to bjDoc|Loop) is|
|00001b10| 20 61 75 74 6f 6d 61 74 | 69 63 61 6c 6c 79 20 63 | automat|ically c|
|00001b20| 6f 6d 70 75 74 65 64 2c | 20 74 68 65 20 61 70 70 |omputed,| the app|
|00001b30| 72 6f 70 72 69 61 74 65 | 20 22 66 65 74 63 68 22 |ropriate| "fetch"|
|00001b40| 0d 69 73 20 61 75 74 6f | 6d 61 74 69 63 61 6c 6c |.is auto|maticall|
|00001b50| 79 20 70 65 72 66 6f 72 | 6d 65 64 2c 20 61 6e 64 |y perfor|med, and|
|00001b60| 20 69 74 20 69 73 20 76 | 65 72 79 20 63 6c 65 61 | it is v|ery clea|
|00001b70| 72 20 77 68 61 74 20 69 | 73 20 67 6f 69 6e 67 20 |r what i|s going |
|00001b80| 6f 6e 2e 20 20 41 6c 73 | 6f 2c 0d 6f 6e 65 20 64 |on. Als|o,.one d|
|00001b90| 6f 65 73 20 6e 6f 74 20 | 6e 65 65 64 20 74 6f 20 |oes not |need to |
|00001ba0| 6b 6e 6f 77 20 74 68 65 | 20 6c 65 6e 67 74 68 20 |know the| length |
|00001bb0| 6f 66 20 74 68 65 20 54 | 48 50 72 69 6e 74 20 72 |of the T|HPrint r|
|00001bc0| 65 63 6f 72 64 20 77 68 | 65 6e 20 61 6c 6c 6f 63 |ecord wh|en alloc|
|00001bd0| 61 74 69 6e 67 0d 6d 65 | 6d 6f 72 79 20 66 6f 72 |ating.me|mory for|
|00001be0| 20 74 68 65 20 68 61 6e | 64 6c 65 20 68 50 72 69 | the han|dle hPri|
|00001bf0| 6e 74 2e 20 20 4d 65 72 | 65 6c 79 20 70 61 73 73 |nt. Mer|ely pass|
|00001c00| 69 6e 67 20 74 68 65 20 | 63 6c 61 73 73 20 70 6f |ing the |class po|
|00001c10| 69 6e 74 65 72 20 74 6f | 20 44 61 74 61 4c 65 6e |inter to| DataLen|
|00001c20| 67 74 68 0d 77 69 6c 6c | 20 64 6f 20 74 68 61 74 |gth.will| do that|
|00001c30| 20 6a 6f 62 20 20 28 20 | 73 65 65 20 64 65 66 69 | job ( |see defi|
|00001c40| 6e 69 74 69 6f 6e 20 6f | 66 20 44 61 74 61 4c 65 |nition o|f DataLe|
|00001c50| 6e 67 74 68 20 61 74 20 | 74 68 65 20 62 65 67 69 |ngth at |the begi|
|00001c60| 6e 6e 69 6e 67 20 6f 66 | 20 74 68 69 73 20 66 69 |nning of| this fi|
|00001c70| 6c 65 29 0d 61 73 20 69 | 6e 20 74 68 65 20 6e 65 |le).as i|n the ne|
|00001c80| 77 3a 20 6d 65 74 68 6f | 64 20 66 6f 72 20 50 72 |w: metho|d for Pr|
|00001c90| 69 6e 74 4d 61 6e 61 67 | 65 72 2e 0d 0d 0d 0d 44 |intManag|er.....D|
|00001ca0| 6f 75 67 20 48 6f 66 66 | 6d 61 6e 20 20 09 32 34 |oug Hoff|man .24|
|00001cb0| 4a 75 6c 39 32 0d 0d 43 | 6f 6d 70 75 73 65 72 76 |Jul92..C|ompuserv|
|00001cc0| 65 20 37 32 33 31 30 2c | 31 37 34 33 00 00 00 00 |e 72310,|1743....|
|00001cd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ce0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001cf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001d00| 00 00 01 00 00 00 01 3c | 00 00 00 3c 00 00 00 3b |.......<|...<...;|
|00001d10| 69 6e 74 09 09 69 43 75 | 72 43 6f 70 79 09 09 5c |int..iCu|rCopy..\|
|00001d20| 20 63 6f 70 79 20 62 65 | 69 6e 67 20 70 72 69 6e | copy be|ing prin|
|00001d30| 0c 50 72 69 6e 74 4d 61 | 6e 61 67 65 72 61 02 00 |.PrintMa|nagera..|
|00001d40| 00 00 50 61 72 74 53 49 | 54 21 00 00 00 00 00 00 |..PartSI|T!......|
|00001d50| 00 00 50 61 72 74 53 49 | 54 21 00 00 00 00 00 00 |..PartSI|T!......|
|00001d60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001d70| 00 00 b3 66 c2 7a 00 00 | 00 00 00 00 01 77 6e 67 |...f.z..|.....wng|
|00001d80| 20 70 61 67 65 0d 20 20 | 20 20 62 6f 6f 6c 09 66 | page. | bool.f|
|00001d90| 49 6d 61 67 69 6e 67 0d | 09 68 61 6e 64 6c 65 09 |Imaging.|.handle.|
|00001da0| 68 50 72 69 6e 74 09 09 | 5c 20 70 72 69 6e 74 20 |hPrint..|\ print |
|00001db0| 72 65 63 6f 72 64 0d 09 | 76 61 72 09 09 70 50 72 |record..|var..pPr|
|00001dc0| 50 6f 72 74 09 09 5c 20 | 70 72 69 6e 74 69 6e 67 |Port..\ |printing|
|00001dd0| 20 67 72 61 66 70 6f 72 | 74 0d 09 68 61 6e 64 6c | grafpor|t..handl|
|00001de0| 65 09 68 50 69 63 0d 3b | 63 6c 61 73 73 0d 0d 0d |e.hPic.;|class...|
|00001df0| 3a 63 6c 61 73 73 20 50 | 72 69 6e 74 4d 61 6e 61 |:class P|rintMana|
|00001e00| 00 00 00 38 00 00 00 00 | 00 00 0c 95 00 00 10 c2 |...8....|........|
|00001e10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001e20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 08 94 |........|........|
|00001e30| 00 00 08 9a 00 00 00 00 | 00 00 00 00 00 00 01 00 |........|........|
|00001e40| 00 00 01 3c 00 00 00 3c | 00 00 00 3b 00 71 f3 f4 |...<...<|...;.q..|
|00001e50| 0d 98 00 00 00 1c 00 32 | 00 00 4d 49 46 4f 00 00 |.......2|..MIFO..|
|00001e60| 00 0a 00 80 00 00 00 00 | 00 00 00 71 fb 0c 08 4d |........|...q...M|
|00001e70| 69 73 63 49 6e 66 6f 00 | 00 00 00 00 00 00 00 00 |iscInfo.|........|
+--------+-------------------------+-------------------------+--------+--------+